<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>99乘法表</title>
    <style>

        tr, td {
            background-color:cornflowerblue;
            border: 1px solid black;
            font-size: 20px;
        }
    </style>
</head>
<body>
    <table></table>
</body>

<script>
 
     let table = document.querySelector('table');

        for (let i = 1; i <= 9; i++) {// 行
            let tr = document.createElement('tr');
            for (let j = 1; j <= i; j++) { // 列
                let td = document.createElement('td');
                td.innerText = `${j}*${i}=${j * i}`;
                tr.appendChild(td);
            }
            table.appendChild(tr);
        }
   

        
</script>
</body>
</html>
